package com.zhaopin.json;


import java.io.*;
import java.net.Socket;

public class Client {
    public static void main(String[] args) throws Exception {
        Socket s = new Socket("127.0.0.1", 8888);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        dos.writeUTF("abc");

        s.getOutputStream().write(baos.toByteArray());
        s.getOutputStream().flush();

        s.close();
    }
}